﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Day02NightInterface
{
    public class GraphManage
    {
        public List<Graph> Graphs = null;
        /// <summary>
        /// 总面积
        /// </summary>
        /// <returns></returns>
        public float GetTotalArea()
        {
            float totalArea = 0;
            foreach (Graph item in Graphs)
            {
                totalArea += item.CalculateArea();
            }
            return totalArea;
        }
        /// <summary>
        /// 总周长
        /// </summary>
        /// <returns></returns>
        public float GetTotalPerimeter()
        {
            float totalPerimeter = 0;
            foreach (Graph item in Graphs)
            {
                totalPerimeter += item.CalculatePerimeter();
            }
            return totalPerimeter;
        }
    }
}